home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 11 / PC World Interactive 11.iso / share / convert / o2cv10.arj / O2CPACK / EXAMPLE2.ASM < prev    next >
Assembly Source File  |  1996-01-27  |  1KB  |  62 lines

  1. ;This file is part of the Object to Coff (O2C) package!
  2. ;------------------------------------------------------
  3.  
  4.                 p386
  5.                 ideal
  6.                 model flat,C
  7.  
  8.  
  9.                 dataseg
  10.  
  11. extrn           TextjeC: dataptr
  12. TextjeAsm:      db    'hello world from assembler',0
  13.  
  14.  
  15.                 codeseg
  16.  
  17. extrn           printf: proc
  18.  
  19.  
  20. public PrintTextC
  21. proc            PrintTextC
  22.  
  23.                 push  offset TextjeC
  24.                 call  printf
  25.                 add   sp,4
  26.                 ret
  27.  
  28. endp            PrintTextC
  29.  
  30.  
  31. public PrintTextAsm
  32. proc            PrintTextAsm
  33.  
  34.                 push  offset TextjeAsm
  35.                 call  printf
  36.                 add   sp,4
  37.                 ret
  38.  
  39. endp            PrintTextAsm
  40.  
  41.  
  42. public StrCaseSwap
  43. proc            StrCaseSwap
  44. arg StrPtr: dword
  45.  
  46.                 mov   esi,[dword StrPtr]
  47.                 mov   edi,esi
  48. @@lp1:          lodsb
  49.                 and   al,al
  50.                 jz    @@end
  51.                 cmp   al,'A'
  52.                 jc    @@skip
  53.                 xor   al,20h
  54. @@skip:         stosb
  55.                 jmp   @@lp1
  56. @@end:          ret
  57.  
  58. endp            StrCaseSwap
  59.  
  60. end
  61.  
  62.